Adwaita: generalize .has-open-popup
authorLapo Calamandrei <calamandrei@gmail.com>
Fri, 23 Oct 2015 14:58:17 +0000 (16:58 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Fri, 23 Oct 2015 14:58:17 +0000 (16:58 +0200)
so it works for any list-row istead of just the ones in a sidebar.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index ee61b6376cefd9dd54fc623471c4fa12cbde2cf2..d5ba620851d72e108124e98862b9eec5cf7337f1 100644 (file)
@@ -2542,20 +2542,19 @@ GtkScrolledWindow {
 }
 
 .list-row.activatable {
-  // let's take care of background colors
-  &:hover {
-    //background-color: mix($fg_color, $base_color, 5%);
-    background-color: if(variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95));
-  }
-  &:active {
-    box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8);
-  }
+  &.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
+  &:hover { background-color: if(variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95)); }
+
+  &:active { box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8); }
+
   &:backdrop:hover { background-color: transparent; }
+
   &:selected {
     &:active { box-shadow: inset 0 2px 3px -1px transparentize(black, 0.5); }
-    &:hover {
-      background-color: mix($fg_color, $selected_bg_color, 10%);
-    }
+
+    &.has-open-popup,
+    &:hover { background-color: mix($fg_color, $selected_bg_color, 10%); }
+
     &:backdrop { background-color: $selected_bg_color; }
   }
 }
@@ -2895,9 +2894,6 @@ GtkPlacesSidebar.sidebar {
     &:not(:hover):not(:active) > image,
     &:backdrop > image { opacity: $_placesidebar_icons_opacity };
   }
-  // this is for indicating which sidebar row generated a popover
-  // see https://bugzilla.gnome.org/show_bug.cgi?id=754411
-  .has-open-popup { @extend .list-row.activatable:hover; }
 }
 
 .sidebar-item {
index c4b13911264ba2786401a7bc841efa66d7e92dae..e55062208569155c864eebd75590af6191e00003 100644 (file)
@@ -3471,15 +3471,15 @@ GtkScrolledWindow GtkViewport.frame {
 .grid-child {
   padding: 2px; }
 
-.list-row.activatable:hover, GtkPlacesSidebar.sidebar .has-open-popup {
+.list-row.activatable.has-open-popup, .list-row.activatable:hover {
   background-color: rgba(238, 238, 236, 0.05); }
 .list-row.activatable:active {
   box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.2); }
-.list-row.activatable:backdrop:hover, GtkPlacesSidebar.sidebar .has-open-popup:backdrop {
+.list-row.activatable:backdrop:hover {
   background-color: transparent; }
 .list-row.activatable:selected:active {
   box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.5); }
-.list-row.activatable:selected:hover, GtkPlacesSidebar.sidebar .has-open-popup:selected {
+.list-row.activatable:selected.has-open-popup, .list-row.activatable:selected:hover {
   background-color: #366ca4; }
 .list-row.activatable:selected:backdrop {
   background-color: #215d9c; }
@@ -3977,7 +3977,7 @@ GtkPlacesView .server-list-button > image {
 GtkPlacesView .server-list-button:checked > image {
   transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
   -gtk-icon-transform: rotate(-0.5turn); }
-GtkPlacesView .list-row.activatable:hover, GtkPlacesView GtkPlacesSidebar.sidebar .has-open-popup, GtkPlacesSidebar.sidebar GtkPlacesView .has-open-popup {
+GtkPlacesView .list-row.activatable:hover {
   background-color: transparent; }
 
 /*********
index a2baf5964ed9ba3336c67a8975a63ed3b1063c63..edd406de5ca3c3d63fdb3ad3fdf2d9e3bf6577a5 100644 (file)
@@ -3633,15 +3633,15 @@ GtkScrolledWindow GtkViewport.frame {
 .grid-child {
   padding: 2px; }
 
-.list-row.activatable:hover, GtkPlacesSidebar.sidebar .has-open-popup {
+.list-row.activatable.has-open-popup, .list-row.activatable:hover {
   background-color: rgba(46, 52, 54, 0.05); }
 .list-row.activatable:active {
   box-shadow: inset 0 2px 2px -2px rgba(0, 0, 0, 0.2); }
-.list-row.activatable:backdrop:hover, GtkPlacesSidebar.sidebar .has-open-popup:backdrop {
+.list-row.activatable:backdrop:hover {
   background-color: transparent; }
 .list-row.activatable:selected:active {
   box-shadow: inset 0 2px 3px -1px rgba(0, 0, 0, 0.5); }
-.list-row.activatable:selected:hover, GtkPlacesSidebar.sidebar .has-open-popup:selected {
+.list-row.activatable:selected.has-open-popup, .list-row.activatable:selected:hover {
   background-color: #4787c9; }
 .list-row.activatable:selected:backdrop {
   background-color: #4a90d9; }
@@ -4149,7 +4149,7 @@ GtkPlacesView .server-list-button > image {
 GtkPlacesView .server-list-button:checked > image {
   transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
   -gtk-icon-transform: rotate(-0.5turn); }
-GtkPlacesView .list-row.activatable:hover, GtkPlacesView GtkPlacesSidebar.sidebar .has-open-popup, GtkPlacesSidebar.sidebar GtkPlacesView .has-open-popup {
+GtkPlacesView .list-row.activatable:hover {
   background-color: transparent; }
 
 /*********